<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    
    <xsl:output method="html" omit-xml-declaration="yes" indent="yes" />
    
    <xsl:template match="org.keyintegrity.webbeans.metadata.store.xmlstream.XmlStreamStore">
    	<xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="org.keyintegrity.webbeans.metadata.store.xmlstream.XmlBeanMetadata">
    	<table>
    		<thead>
    			<tr style="background-color: #f0f0f0;" >
    				<th colspan="5">Metadata for <code><xsl:copy-of select="AssociatedClass/*"/></code></th>
    			</tr>
    			<tr style="background-color: maroon; color: white;">
    				<th>Field Name</th>
    				<th>Appearance</th>
    				<th>Read Only</th>
    				<th>Display Pattern</th>
    				<th>Type Parameter</th>
    			</tr>
    		</thead>
    		<tbody>
	    		<xsl:apply-templates/>
    		</tbody>
    		<!-- tfoot>
    			<tr>
    				<td colspan="5">
			    		Remove this metadata:
			    		<xsl:copy-of select="../removeEntryAction/*"/>
    				</td>
    			</tr>
    		</tfoot -->
    	</table>
	</xsl:template>
	
    <xsl:template match="org.keyintegrity.webbeans.metadata.store.xmlstream.XmlFieldMetadata">
    	<tr>
    		<td><xsl:copy-of select="FieldName/*"/></td>
    		<td><xsl:copy-of select="Appearance/*"/></td>
    		<td><xsl:copy-of select="ReadOnly/*"/></td>
    		<td><xsl:copy-of select="DisplayPattern/*"/></td>
    		<td><xsl:copy-of select="TypeParameter/*"/></td>
    	</tr>
	</xsl:template>
	
    <xsl:template match="MetadataList">
		<xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="XmlFieldsMetadata">
		<xsl:apply-templates/>
    </xsl:template>
	
	<xsl:template match="listEntry">
    	<xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="AssociatedClass"/>
	
	<xsl:template match="removeEntryAction"/>
	<xsl:template match="addEntryAction"/>
	
</xsl:stylesheet>